package net.towee.client.event.core;

import net.towee.model.utils.Pair;

import com.google.gwt.event.shared.GwtEvent;

public class UserOnlineStateUpdated extends GwtEvent<UserOnlineStateHandler> {
	public static Type<UserOnlineStateHandler> TYPE = new Type<UserOnlineStateHandler>();
	private final Pair<String, Boolean> state;
	
	public UserOnlineStateUpdated(Pair<String, Boolean> state){
		this.state = state; 
	}

	@Override
	protected void dispatch(UserOnlineStateHandler handler) {
		handler.onlineStateChanged(state);
	}

	@Override
	public Type<UserOnlineStateHandler> getAssociatedType() {
		return TYPE;
	}
}
